package top.feiskyend.core.web.dao.user;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import top.feiskyend.core.web.model.po.UserPo;

/**
 * @author: YTF
 * @date: 2022/9/13 15:26
 * @version: 1.0
 * @email: 1712310435@qq.com
 * @description:
 */
@Mapper
@Repository
public interface UserMapper {

    /**
     * id查找用户
     * @param id
     * @return 用户
     */
    UserPo selectById(int id);

    /**
     * 用户名查找用户
     * @param username
     * @return 用户
     */
    UserPo selectByName(String username);

    /**
     * 生成新用户
     * @param user
     * @return
     */
    int insertUser(UserPo user);

}
